
include_directories(${CrimsonCore_SOURCE_DIR}/tools/CrimsonCoreEditor/src)
include_directories(${CrimsonCore_BINARY_DIR}/tools/CrimsonCoreEditor/src)


add_definitions(-D_USE_MATH_DEFINES)


set(
	CCE_SOURCES
	helper.cpp
	helper.h
	main.cpp
	mainwindow.cpp
	mainwindow.h
	session.cpp
	session.h
	)

set(
	CCE_COLORPICKER_SOURCES
	colorpicker/colorpicker.cpp
	colorpicker/colorpicker.h
	colorpicker/colorselectorbutton.cpp
	colorpicker/colorselectorbutton.h
	)

set(
	CCE_MATERIAL_SOURCES
	material/glslsyntaxhighlighter.cpp
	material/glslsyntaxhighlighter.h
	material/glsltexteditor.cpp
	material/glsltexteditor.h
	material/material.qss
	material/materialeditor.cpp
	material/materialeditor.h
	material/materialmanager.cpp
	material/materialmanager.h
	material/materialmenubutton.cpp
	material/materialmenubutton.h
	material/materialoverviewdialog.cpp
	material/materialoverviewdialog.h
	material/materialview.cpp
	material/materialview.h
	)


set(
	CCE_MATERIAL_EFFECTEDITOR_SOURCES
	material/effecteditor/effecteditordialog.cpp
	material/effecteditor/effecteditordialog.h
	material/effecteditor/effectoverview.cpp
	material/effecteditor/effectoverview.h
	material/effecteditor/effecttreemodel.cpp
	material/effecteditor/effecttreemodel.h
	)

set(
	CCE_MATERIAL_IO_SOURCES
	material/io/iodefines.h
	material/io/materialxmlexporter.cpp
	material/io/materialxmlexporter.h
	material/io/materialreader.cpp
	material/io/materialreader.h
	material/io/materialwriter.cpp
	material/io/materialwriter.h
	)

set(
	CCE_MATERIAL_MATERIALEDITOR_SOURCES
	material/materialeditor/materialeditordialog.cpp
	material/materialeditor/materialeditordialog.h
	material/materialeditor/materialoverview.cpp
	material/materialeditor/materialoverview.h
	material/materialeditor/materialtreemodel.cpp
	material/materialeditor/materialtreemodel.h
	material/materialeditor/textureslot.cpp
	material/materialeditor/textureslot.h
	)

set(
	CCE_MATERIAL_PROGRAMEDITOR_SOURCES
	material/programeditor/programeditordialog.cpp
	material/programeditor/programeditordialog.h
	material/programeditor/programoverview.cpp
	material/programeditor/programoverview.h
	material/programeditor/programtreemodel.cpp
	material/programeditor/programtreemodel.h
	)

set(
	CCE_MATERIAL_SHADEREDITOR_SOURCES
	material/shadereditor/shadereditordialog.cpp
	material/shadereditor/shadereditordialog.h
	material/shadereditor/shaderoverview.cpp
	material/shadereditor/shaderoverview.h
	material/shadereditor/shadertreemodel.cpp
	material/shadereditor/shadertreemodel.h
	)

set(
	CCE_MATERIAL_TEXTUREEDITOR_SOURCES
	material/textureeditor/textureeditordialog.cpp
	material/textureeditor/textureeditordialog.h
	material/textureeditor/textureoverview.cpp
	material/textureeditor/textureoverview.h
	material/textureeditor/texturetreemodel.cpp
	material/textureeditor/texturetreemodel.h
	)

set(
	CCE_OBJECT_SOURCES
	object/object.qss
	object/objectoverviewdialog.cpp
	object/objectoverviewdialog.h
	object/objectsceneview.cpp
	object/objectsceneview.h
	)

set(
	CCE_SCENEEDITOR_SOURCES
	sceneeditor/sceneeditorsceneview.cpp
	sceneeditor/sceneeditorsceneview.h
	)

set(
	CCE_SCENEVIEW_SOURCES
	sceneview/sceneview.cpp
	sceneview/sceneview.h
	)

set(
	CCE_MOC_SOURCES
	helper.h
	mainwindow.h
	session.h

	colorpicker/colorpicker.h
	colorpicker/colorselectorbutton.h

	material/glslsyntaxhighlighter.h
	material/glsltexteditor.h
	material/materialeditor.h
	material/materialmanager.h
	material/materialmenubutton.h
	material/materialoverviewdialog.h
	material/materialview.h


	material/effecteditor/effecteditordialog.h
	material/effecteditor/effectoverview.h
	material/effecteditor/effecttreemodel.h

	material/materialeditor/materialeditordialog.h
	material/materialeditor/materialoverview.h
	material/materialeditor/materialtreemodel.h
	material/materialeditor/textureslot.h

	material/programeditor/programeditordialog.h
	material/programeditor/programoverview.h
	material/programeditor/programtreemodel.h

	material/shadereditor/shadereditordialog.h
	material/shadereditor/shaderoverview.h
	material/shadereditor/shadertreemodel.h

	material/textureeditor/textureeditordialog.h
	material/textureeditor/textureoverview.h
	material/textureeditor/texturetreemodel.h

	object/objectoverviewdialog.h
	object/objectsceneview.h

	sceneeditor/sceneeditorsceneview.h

	sceneview/sceneview.h

	)

set(
	CCE_UI_SOURCES
	colorpicker/colorpickerwidget.ui

	material/materialgenericgraphicsviewoverview.ui
	material/materialgenericlistoverview.ui
	material/materialoverviewwidget.ui
	material/effecteditor/effecteditorwidget.ui
	material/materialeditor/materialeditorwidget.ui
	material/programeditor/programeditorwidget.ui
	material/shadereditor/shadereditorwidget.ui
	material/textureeditor/textureeditorwidget.ui

	object/objectoverviewwidget.ui
	)


QT4_WRAP_CPP(
	CCE_MOCCED_SOURCES
	${CCE_MOC_SOURCES}
	)

QT4_WRAP_UI(
	CCE_UIED_SOURCES
	${CCE_UI_SOURCES}
	)

QT4_ADD_RESOURCES(
	CCE_RESOURCES
	resources.qrc
	)

source_group(
	"CrimsonCoreEditor"
	FILES
	${CCE_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\colorpicker"
	FILES
	${CCE_COLORPICKER_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\material"
	FILES
	${CCE_MATERIAL_SOURCES}
	)


source_group(
	"CrimsonCoreEditor\\material\\effecteditor"
	FILES
	${CCE_MATERIAL_EFFECTEDITOR_SOURCES}
	"CrimsonCoreEditor\\material\\materialeditor"
	)

source_group(
	"CrimsonCoreEditor\\material\\io"
	FILES
	${CCE_MATERIAL_IO_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\material\\materialeditor"
	FILES
	${CCE_MATERIAL_MATERIALEDITOR_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\material\\programeditor"
	FILES
	${CCE_MATERIAL_PROGRAMEDITOR_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\material\\shadereditor"
	FILES
	${CCE_MATERIAL_SHADEREDITOR_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\material\\textureeditor"
	FILES
	${CCE_MATERIAL_TEXTUREEDITOR_SOURCES}
	)


source_group(
	"CrimsonCoreEditor\\object"
	FILES
	${CCE_OBJECT_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\sceneeditor"
	FILES
	${CCE_SCENEEDITOR_SOURCES}
	)

source_group(
	"CrimsonCoreEditor\\sceneview"
	FILES
	${CCE_SCENEVIEW_SOURCES}
	)


add_executable(
	CrimsonCoreEditor
	${CCE_SOURCES}
	${CCE_COLORPICKER_SOURCES}
	${CCE_MATERIAL_SOURCES}
	${CCE_MATERIAL_COMMON_SOURCES}
	${CCE_MATERIAL_EFFECTEDITOR_SOURCES}
	${CCE_MATERIAL_IO_SOURCES}
	${CCE_MATERIAL_MATERIALEDITOR_SOURCES}
	${CCE_MATERIAL_PROGRAMEDITOR_SOURCES}
	${CCE_MATERIAL_SHADEREDITOR_SOURCES}
	${CCE_MATERIAL_TEXTUREEDITOR_SOURCES}
	${CCE_MOCCED_SOURCES}
	${CCE_OBJECT_SOURCES}
	${CCE_SCENEEDITOR_SOURCES}
	${CCE_SCENEVIEW_SOURCES}
	${CCE_UIED_SOURCES}
	${CCE_RESOURCES}
	)

target_link_libraries(
	CrimsonCoreEditor
	CrimsonEngine
	${QT_LIBRARIES}
	${OPENGL_LIBRARIES}
	${GLEW_LIBRARIES}
	)


